"0","S <- function(df) {
  specimens <- data.frame(table(sample(s.probs$species,df$N,prob = s.probs$probs, replace =TRUE)))
  richness <- nrow(specimens[(specimens$Freq > 0),])
  return(richness)
}
sampled.diversity <- ddply(time.series,.(time.bin,N),each(S))

p <- ggplot(sampled.diversity,aes(time.bin,S))
p + geom_line() + geom_point()"
